/****************************************************************
 * Fulguro
 * Copyright (C) 2004 Christophe Clienti
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 ***************************************************************/

#ifdef __cplusplus
extern "C" {
#endif

#ifndef __FLGR_LINEAR_FFT_H
#define __FLGR_LINEAR_FFT_H

#include <flgrCoreDll.h>
#include <flgrCoreErrors.h>
#include <flgrCoreTypes.h>
#include <flgrCoreData.h>
#include <fftw3.h>

  /*! 
    Buffer containing a fast Fourier transform of an image
   */





/**************************************** 1D Functions ***************************/



  EXPORT_LIB FLGR_Ret flgr1d_fft_forward_cplx(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB FLGR_Ret flgr1d_fft_backward_cplx(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB FLGR_Ret flgr1d_fft_forward_real(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB FLGR_Ret flgr1d_fft_backward_real(FLGR_Data1D *datdest, FLGR_Data1D *datfft);


  EXPORT_LIB void flgr1d_fft_forward_cplx_fgBIT(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_cplx_fgUINT8(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_cplx_fgUINT16(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_cplx_fgUINT32(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_cplx_fgINT8(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_cplx_fgINT16(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_cplx_fgINT32(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_cplx_fgFLOAT32(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_cplx_fgFLOAT64(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);

  EXPORT_LIB void flgr1d_fft_backward_cplx_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_cplx_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_cplx_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_cplx_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_cplx_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_cplx_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_cplx_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_cplx_fgFLOAT32(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_cplx_fgFLOAT64(FLGR_Data1D *datdest, FLGR_Data1D *datfft);

  EXPORT_LIB void flgr1d_fft_forward_real_fgBIT(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_real_fgUINT8(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_real_fgUINT16(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_real_fgUINT32(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_real_fgINT8(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_real_fgINT16(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_real_fgINT32(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_real_fgFLOAT32(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);
  EXPORT_LIB void flgr1d_fft_forward_real_fgFLOAT64(FLGR_Data1D *datfft, FLGR_Data1D *datsrc);

  EXPORT_LIB void flgr1d_fft_backward_real_fgBIT(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_real_fgUINT8(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_real_fgUINT16(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_real_fgUINT32(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_real_fgINT8(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_real_fgINT16(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_real_fgINT32(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_real_fgFLOAT32(FLGR_Data1D *datdest, FLGR_Data1D *datfft);
  EXPORT_LIB void flgr1d_fft_backward_real_fgFLOAT64(FLGR_Data1D *datdest, FLGR_Data1D *datfft);






/**************************************** 2D Functions ***************************/



  EXPORT_LIB FLGR_Ret flgr2d_fft_forward_cplx(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB FLGR_Ret flgr2d_fft_backward_cplx(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB FLGR_Ret flgr2d_fft_forward_real(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB FLGR_Ret flgr2d_fft_backward_real(FLGR_Data2D *datdest, FLGR_Data2D *datfft);

  EXPORT_LIB FLGR_Ret flgr2d_fft_switch_corner(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);


  EXPORT_LIB void flgr2d_fft_forward_cplx_fgBIT(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_cplx_fgUINT8(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_cplx_fgUINT16(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_cplx_fgUINT32(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_cplx_fgINT8(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_cplx_fgINT16(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_cplx_fgINT32(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_cplx_fgFLOAT32(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_cplx_fgFLOAT64(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);

  EXPORT_LIB void flgr2d_fft_backward_cplx_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_cplx_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_cplx_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_cplx_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_cplx_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_cplx_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_cplx_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_cplx_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_cplx_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datfft);

  EXPORT_LIB void flgr2d_fft_forward_real_fgBIT(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_real_fgUINT8(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_real_fgUINT16(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_real_fgUINT32(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_real_fgINT8(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_real_fgINT16(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_real_fgINT32(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_real_fgFLOAT32(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_forward_real_fgFLOAT64(FLGR_Data2D *datfft, FLGR_Data2D *datsrc);

  EXPORT_LIB void flgr2d_fft_backward_real_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_real_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_real_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_real_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_real_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_real_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_real_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_real_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datfft);
  EXPORT_LIB void flgr2d_fft_backward_real_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datfft);


  EXPORT_LIB void flgr2d_fft_switch_corner_fgBIT(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_switch_corner_fgUINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_switch_corner_fgUINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_switch_corner_fgUINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_switch_corner_fgINT8(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_switch_corner_fgINT16(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_switch_corner_fgINT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_switch_corner_fgFLOAT32(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);
  EXPORT_LIB void flgr2d_fft_switch_corner_fgFLOAT64(FLGR_Data2D *datdest, FLGR_Data2D *datsrc);

#endif

#ifdef __cplusplus
}
#endif
